﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;

namespace RadLogger_Pro
{
    public partial class About_Radiation_Logger : Form
    {
        public About_Radiation_Logger()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void About_Radiation_Logger_Load(object sender, EventArgs e)
        {
            var aboutLink = new LinkLabel.Link { LinkData = "http://www.thibmoprograms.com/" };
            linkLabel1.Links.Add(aboutLink);
            var aboutRadMonLink = new LinkLabel.Link { LinkData = "http://www.radmon.org/" };
            linkLabel2.Links.Add(aboutRadMonLink);
            var aboutRH = new LinkLabel.Link { LinkData = "http://radiohobbystore.com/" };
            linkLabel3.Links.Add(aboutRH);
            VersionLabel.Text = Assembly.GetEntryAssembly().GetName().Version.ToString();
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                Process.Start(e.Link.LinkData as string);
            }
            catch (Exception)
            {
            }
            
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            string url = "";

            const string business = "thibmorozier@live.nl"; // your paypal email
            const string description = "Donation%20For%20RadLogger%20Pro"; // '%20' represents a space. remember HTML!
            const string country = "NL"; // AU, US, etc.
            const string currency = "USD"; // AUD, USD, etc.

            url += "https://www.paypal.com/cgi-bin/webscr" +
                "?cmd=" + "_donations" +
                "&business=" + business +
                "&lc=" + country +
                "&item_name=" + description +
                "&currency_code=" + currency +
                "&bn=" + "PP%2dDonationsBF";

            Process.Start(url);
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            string urlImg = "";
            urlImg += "http://www.thibmoprograms.com/";
            Process.Start(urlImg);
        }

        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                Process.Start(e.Link.LinkData as string);
            }
            catch (Exception)
            {
            }
        }

        private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                Process.Start(e.Link.LinkData as string);
            }
            catch (Exception)
            {
            }
        }
    }
}
